/**
 * 
 */
package com.davinci.freemarket.businessLayer.controllers;

import java.sql.ResultSet;
import java.util.ArrayList;

import org.junit.Assert;

import com.davinci.freemarket.dataAccessLayer.accessdata.comment.CommentDAO;
import com.davinci.freemarket.dataAccessLayer.accessdata.publicacion.PublicacionDAO;
import com.davinci.freemarket.dataModelLayer.model.CommentModel;
import com.davinci.freemarket.dataModelLayer.model.DBAttibuteModel;
import com.davinci.freemarket.dataModelLayer.model.PublicationModel;

/**
 * @author Muma
 *
 */
public class CommentsController 
{

	protected CommentDAO commentsDAO;

	/**
	 * 
	 */
	public CommentsController() {
		super();
		this.commentsDAO = new CommentDAO();
	}
	
	/**
	 * 
	 * @param params
	 */
	public Boolean addComment(CommentModel params) {
		int rs = commentsDAO.addComment(params.getUserID(), params.getQuestion(), params.getPublicationID(), false);
		return rs != 0;
	}
	
	/**
	 * 
	 * @param params
	 */
	public Boolean modifyComment(CommentModel params){
		int rs = commentsDAO.addAnswer(params.getCommentID(), params.getResponse());
		return rs != 0;
	}
	
	/**
	 * 
	 * @param params
	 */
	public void deleteComment(CommentModel params){
	}
	
	/**
	 * 
	 * @param params
	 * @return
	 */
	public ArrayList<PublicationModel> getComments(ArrayList<DBAttibuteModel> conditions) 
	{
		return null;
	}
	
	

}
